package com.jiangjiang.eshop.inventory.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @ClassName StockUpdateMessageEntity
 * @Description TODO
 * @Author jhw
 * @Date 2021/6/14 17:16
 * @Version 1.0
 **/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("inventory_offline_stock_update_message")
public class StockUpdateMessageEntity {
    /**
     * 主键
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    /**
     * 库存更新消息id
     */
    @TableField("message_id")
    private String messageId;
    /**
     * 库存更新操作
     */
    @TableField("operation")
    private Integer operation;
    /**
     * 参数对象 JSON
     */
    @TableField("parameter")
    private String parameter;
    /**
     * 参数类型
     */
    @TableField("parameter_clazz")
    private String parameterClazz;
    /**
     * 创建时间
     */
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date gmtCreate;
    /**
     * 更新时间
     */
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date gmtModified;

}
